#ifndef SEARCHWIDGET_H
#define SEARCHWIDGET_H

#include <QtGui>

namespace Ui {
    class SearchWidget;
}

class SearchWidget : public QWidget {
    Q_OBJECT
public:
    SearchWidget(QWidget *parent = 0);
    ~SearchWidget();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::SearchWidget *m_ui;
    bool m_visible;
    enum {GOOGLE = 1, YANDEX = 2, YAHOO = 3, MAIL = 4, RAMBLER = 5, NONE = 0};
    int m_searchEngine;
    bool isAreaVisible();
public slots:
    void search(QString = QString());
private slots:
    void on_searchBtn_clicked();
    void on_searchLineEdit_returnPressed();
    void showArea();
    void hideArea();
    void on_ramblerBtn_clicked();
    void on_mailBtn_clicked();
    void on_yahooBtn_clicked();
    void on_yandexBtn_clicked();
    void on_googleBtn_clicked();
};

#endif // SEARCHWIDGET_H
